/**
 * 账号功能模块相关的所有的请求都是放在这这里面的
 */
import req from '@/utils/request'

/* -----------------------------------登录请求-------------------------------------------- */
export function checkLogin(params) {
  return req.post('/users/checkLogin', params)
}

/* -----------------------------------添加账号-------------------------------------------- */
export function addAccount(params) {
  return req.post('/users/add', params)
}

/* -----------------------------------获取账号列表-------------------------------------------- */
export function getAccountList(params) {
  return req.get('/users/list', params)
}

/* -----------------------------------删除账号-------------------------------------------- */
export function delAccount(params) {
  return req.get('/users/del', params)
}


/* -----------------------------------批量删除账号-------------------------------------------- */
export function batchDelAccount(params) {
  return req.get('/users/batchdel', params)
  // ["76","77","78","79","80"]
}

/* -----------------------------------修改账号-------------------------------------------- */
export function editAccount(params) {
  return req.post('/users/edit', params)
}
/* -----------------------------------检查旧密码是否正确------------------------------------ */
export function checkoldpwd(parmas) {
  return req.post('/users/checkoldpwd', parmas)
}

// 获取个人信息
export function getPersonalInfo() {
  return req.get('/users/info')
}

// 获取头像
export function getPersonalAvatarUpload(params) {
  return req.post('/users/avatar_upload', params)
}

// 修改用户头像
export function getPersonalAvatarEdit(params) {
  return req.get('/users/avataredit', params)
}